package ink.xiaobaibai.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 *
 * </p>
 *
 * @author xiaobaibai
 * @since 2021-05-22
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("device_log")
@NoArgsConstructor
public class DeviceLog implements Serializable {

    private static final long serialVersionUID = 1L;

    public DeviceLog(String deviceCode) {
        this.deviceCode = deviceCode;
    }

    public DeviceLog(Integer deviceId, String deviceCode, Integer seconds) {
        this.deviceId = deviceId;
        this.deviceCode = deviceCode;
        this.seconds = seconds;
    }

    /**
     * 机器日志id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 机器id
     */
    @TableField(value = "device_id")
    private Integer deviceId;

    /**
     * 机器设备码
     */
    @TableField(value = "device_code")
    private String deviceCode;

    /**
     * 启动时间
     */
    @TableField(value = "seconds")
    private Integer seconds;

    /**
     * 创建时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;


}
